*{
    margin: 0px;
}

body{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: beige;

}
ul,
.li{
    padding: 0;
    list-style:none
}
.side-menu{
    width: 180px;
    height: 520px;
    background-color: #057dfc;
    border-radius: 8px;
    padding: 10px;
    position: relative;
    box-shadow: 03px 4px 16px rgba(4, 106, 214, 0.4);
    transition: width 0.3s linear;
}
.menu-item{
    height: 42px;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: background-color 0.2s linear;
}
.menu-item i {
    font-size: 16px;
}
.menu-text{
    margin-left: 8px;
    transition: opacity 0.2s linear;
}
.popover{
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    border-radius: 3px;
    background-color: #fff;
    color: black;
    padding: 8px;
    font-size: 12px;
    box-shadow: 0 6px 6px rgba(0,0,0,0.1);
    display: none;
}
.popover::before{
    content: '';
    border-width: 6px;
    left:-12px;
    top: 50%;
    position: absolute;
    transform: translateY(-50%);
    border-style:solid ;
    border-right-color: #fff;
    border-top-color: transparent;
    border-left-color: transparent;
    border-bottom-color: transparent;

}
.menu-item:hover{
    background-color: #046fe0;
}
.toggle{
    position:absolute;
    width: calc(100% - 20px);
    padding: 0;
    bottom: 10px;
    justify-content: center;
}
.toggle i {
    font-size: 24px;
    transition: transform 0.2s linear;
}

/* 折叠，展开时候的动效 */
.side-menu.csb{
    width: 42px;
}
.side-menu.csb .toggle i{
    transform: rotate(180deg);
}
.side-menu.csb .menu-text{
    opacity: 0;
} 
.side-menu.csb .menu-item:hover .popover{
    display: inline-block;
}
